package com.jhw.ymcc.dto;

import com.jhw.ymcc.util.AssertUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @author jhw
 * @create 2022/9/26
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegisterDto {

    @Pattern(regexp = "^((13[0-9])|(14[0,1,4-9])|(15[0-3,5-9])|(16[2,5,6,7])|(17[0-8])|(18[0-9])|(19[0-3,5-9]))\\d{8}$",
            message = "手机号格式不正确！")
    private String mobile;

    @Size(min = 6, max = 12, message = "密码必须是6 ~ 12位！")
    private String password;

    @NotNull
    private String smsCode;

    private Integer regChannel;

    private String code;

}
